namespace LightBox.Installer
{
    using System;
    using System.IO;

    using LightBox.Properties;

    /// <summary>
    /// 
    /// </summary>
    class ScriptInstaller : IInstaller
    {
        /// <summary>
        /// 
        /// </summary>
        public ScriptInstaller() {}

        /// <summary>
        /// 
        /// </summary>
        /// <param name="path"></param>
        public void Install(string path)
        {
            DirectoryInfo root = new DirectoryInfo(path);
            DirectoryInfo jsDir = root.CreateSubdirectory("js");

            File.WriteAllText(jsDir.FullName + @"\effects.js", Resources.effects);
            File.WriteAllText(jsDir.FullName + @"\lightbox.js", Resources.lightbox);
            File.WriteAllText(jsDir.FullName + @"\prototype.js", Resources.prototype);
            File.WriteAllText(jsDir.FullName + @"\scriptaculous.js", Resources.scriptaculous);
        }
    }
}
